package com.rutas.java;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;


public class explorer extends Activity {

private static final String WEBPAGE = "http://www.rutasdetenerife.com/";
private WebView webView;

//Esta clase sirve para poder navegar dentro del webView
private class ClienteWeb extends WebViewClient{
	@Override
	public boolean shouldOverrideUrlLoading(WebView view, String url){
		view.loadUrl(url);
		return true;		
	}}

@Override
public void onCreate(Bundle savedInstanceState) {
   	super.onCreate(savedInstanceState);
    setContentView(R.layout.webview);
    
   Button btOk = (Button)findViewById(R.id.btCloseWeb);
   btOk.setBackgroundResource(android.R.drawable.btn_dialog);
    btOk.setOnClickListener(new Button.OnClickListener(){

		@Override
		public void onClick(View arg0) {
			finish();	
		}
    });
    webView = (WebView) findViewById(R.id.webview);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.loadUrl(WEBPAGE);
    webView.setWebViewClient(new ClienteWeb());
}}